package cn.tedu.epidemic.webapi.controller;


import cn.tedu.adminsystem.service.SlideshowService;
import cn.tedu.community.commons.pojo.slideshow.vo.SlideshowList;
import cn.tedu.community.commons.restful.JsonResult;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Slf4j
@RequestMapping("/slideshow")
public class SlideshowController {
    @DubboReference
    private SlideshowService dubboSliService;

    @GetMapping("/list")
    public JsonResult<List<SlideshowList>> list() {
        log.debug("控制层开始处理展示轮播图列表");
        List<SlideshowList> slideshowList = dubboSliService.getSlideshowList();
        log.debug("查询完成，展示轮播图列表：{}",slideshowList);
        return JsonResult.ok(slideshowList);
    }
}
